<template>
    <div>
        <hdcard v-for="(hd,index) in hdlist" :key="index" :hdinfo="hd"></hdcard>
    </div>
</template>

<script>
    import hdcard from '@/components/card/hdcard';
    export default {
        props:{
            ksfenlei:{
                type: String,
                default: ''
            },
        },
        name: "hdhot",
        data () {
            return {
                hdlist:[],
                limits: 10,
            }
        },
        created() {
            this.gethddata()
        },
        computed: {
            userdata(){
                return this.$store.getters.userdata ? this.$store.getters.userdata : '';
            },
        },
        methods: {
            gethddata(){
                var that = this
                that.$toast.loading()
                that.$http.jsonp('https://zg99.offcn.com/index/chaxun/getlist/?actid=1570&callback=?', {
                    params: { limits: that.limits, classfy: that.ksfenlei }
                })
                .then(function (res) {
                    var resjson = res.body
                    if(resjson.status=="1"){
                        that.hdlist = resjson.lists
                    }else{
                        that.hdlist = []
                    }
                })
                .finally(() => {
                    that.$toast.clear()
                })
            },
        },
        components: {
            hdcard
        }
    };
</script>

<style scoped>
</style>